// Font
// (c) jimon game studio

#ifndef JEH_IFONT
#define JEH_IFONT

#include "jeUnknown.h"
#include "IImage.h"
#include "jeImageResource.h"

namespace je
{
	namespace video
	{
		//! Font
		class IFont:public je::jeUnknown
		{
		public:
			//! Destructor
			virtual ~IFont()
			{
			}

			//! Render Text
			virtual void RenderText(IImage * Image,const jeStringd & Text,const jeVector2di & DrawPosition = jeVector2di(0,0),u1 EnableKerning = false,u1 EnableCharsAlphaBlending = false) = 0;

			//! Calculate Text Size
			virtual jeVector2di CalculateTextSize(const jeStringd & Text,u1 EnableKerning = false) = 0;

			//! Get Font Image
			virtual video::IImage * GetFontImage() = 0;

			//! Get Font Resource
			//! If return null, use GetFontImage instead
			virtual media::jeImageResource * GetFontResource() = 0;

			//! Char Metrics
			struct CharMetrics
			{
				je_wchar_t Code;
				f32 U1,V1,U2,V2,SizeX,SizeY,ShiftX,ShiftY,CharShift;
			};

			//! Get Char Metrics
			virtual CharMetrics * GetCharMetrics(je_wchar_t Code) = 0;

			//! Get Kerning
			virtual jeVector2df GetKerning(je_wchar_t PreviousChar,je_wchar_t CurrentChar) = 0;
		};
	}
}

#endif
